package org.aplikator.server.descriptor;

import org.aplikator.client.shared.descriptor.ActionDTO;
import org.aplikator.server.Context;

public class Action extends ServerDescriptorBase {

    private String token;

    public Action(String id, String readableName, String token) {
        super(id);
        this.setLocalizationKey(readableName);
        this.token = token;
    }

    public Action(String name, String token) {
        this(name, name, token);
    }

    public ActionDTO getActionDTO(Context ctx) {
        ActionDTO retval = new ActionDTO( this.getId(), this.getLocalizedName(ctx), token);
        return retval;
    }

}
